package MineGod;

public class GUIHUD extends GUI{

	static double height = 64;
	static int weaponSelected = 0;
	
	GUILabelHealthBar healthBar;
	GUILabelInventory inventory;
	
	
	public GUIHUD(){
		labels.add(new GUILabelProjectileSmall());
		labels.add(new GUILabelProjectileBig());
		labels.add(new GUILabelProjectileDestroy());
		healthBar = new GUILabelHealthBar();
		inventory = new GUILabelInventory();
		labels.add(new GUILabelScoreTicker());
	}

	@Override
	public void updateButtons(MineGod game) {
		
	}

	@Override
	public void updateLabels(MineGod game) {
		weaponSelected = MineGod.player.weaponSelectedIndex;
		toggleLabels();
		GUILabelHealthBar.refreshHealthBar();
	}
	
	private void toggleLabels(){
		for(int i = 0; i < labels.size(); i++){
			if(i == weaponSelected){
				labels.get(i).active = true;
			} else {
				labels.get(i).active = false;
			}
		}
	}
	
	
	public void render(){
		super.render();
		healthBar.render(zIndex);
		inventory.render(zIndex);
	}
	
	
	
	
	
	
	
}
